<%@page import="mindmap.Scenario"%>
<%@page import="java.io.PrintWriter"%>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ page import="java.sql.*" %>
<%@ page import="java.sql.DriverManager" %>
<%@ page import="java.sql.ResultSet" %>
<%
mindmap.ObjectDB db = new mindmap.ObjectDB();
try{
	db.initialiseConnexion();
	mindmap.Scenario myScenario = new mindmap.Scenario(db,
		request.getParameter("id"),
		request.getParameter("name"),
		request.getParameter("comment"),
		request.getParameter("description"),
		request.getParameter("business_value"),
		request.getParameter("mindmap_developer"),
		request.getParameter("complexity"),
		"0",
		"0",
		request.getParameter("fk_userstory_id") 
	);
	
	if(myScenario.addDB()){ 
		out.print("Le scénario a bien été créé");	
	}else{
		response.setStatus(500,"enregistrement error !");	
	}
	db.closeConnexion();
	
}catch(Exception e){
	response.setStatus(500,"error");	
}
%>
